<?php
namespace app\home\model;
use think\Db;
use think\Model;

class SetModel extends Model
{
    // 查
    public function selectInfo($type,$data)
    {
        if (empty($type) or empty($data)) {
            return false;
        }
        switch ($type) {
           
           case 'seleteMini_info':   //查询用户基本信息
               return DB::table('wyz_miniapps')->where('id',$data['miniapps_id'])->field('uid,name')->select();
                break;

            case 'selectTemp_addtime':  //查询购买模板时间
               return Db::table('wyz_admin_pay')->where(['uid'=>$data['uid'],'template_id'=>$data['template_id'],'is_pay'=>1])->field('add_time,price')->select();
                break; 
        }
        return false;
    }

}